// components/header/index.js
const app = getApp()
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    title: {
      type:String,
      value: '',
    },
    src:{
      type:String,
      value:''
    },
    placeImageSrc: {
     type: String,
     value: '../../static/img/nav_bg_image.png'
    },
    isNavHome:{
      type:Boolean,
      value:false
    },
    placeholder: {
      type: String,
      value: '搜索您想看的居家方案'
    },
    backColor: {
      type:Boolean, // 白色或者黑色
      value:false
    }
  },
  attached: function () {
    // const { statusBarHeight } = wx.getSystemInfoSync();
    this.setData({ 
      // statusBarHeight,
      pagesStack: getCurrentPages()
    });
  },
  /**
   * 组件的初始数据
   */
  data: {
    pagesStack: [],
    // isIphoneHeadHeight: wx.getSystemInfoSync().model.search('iPhone') > -1 ? 40 : 42,
    navHeight: app.globalData.navHeight ,
    menuBotton: app.globalData.menuBotton ,
    menuRight: app.globalData.menuRight ,
    menuHeight: app.globalData.menuHeight
  },

  /**
   * 组件的方法列表
   */
  methods: {
    search(){
      wx.navigateTo({
        url:'/pages/Search/main/index'
      })
    },
    goBack() {
      if (this.data.isNavHome){
        wx.switchTab({
          url: '/pages/home/main/index'
        })
      } else  {
        wx.navigateBack({
          
         })
      }
    },
  }
})
